var payComponent = React.createClass({
    componentDidMount: function() {
    },
    receiveMsg: function(data) {

    },
    getInitialState: function () {
        this.props.active = 1;
        return this.props ? this.props : {};
    },
    getData: function(callback) {
        callback(this.state);
    },
    toggleTab: function(index) {
        var _this = this;
        if(this.state.active === index){
            return;
        }
        this.setState({active: index});  // 1:余额支付; 2:银行卡支付, 3:支付平台

    },
    setPaymentBank: function(index){
        if(this.state.banks[index].value){
            return;
        }else{
            this.state.banks.map(function(val){
                val.value = false;
            });
            this.state.banks[index].value = true;
            this.setState();
            // eventFlux.dispatch(['payment_init_Event'], {change: 'banks', data: this.state.banks});
        }
    },
    setPaymentPlatform: function(index){
        if(this.state.platform[index].value){
            return;
        }else{
            this.state.platform.map(function(val){
                val.value = false;
            });
            this.state.platform[index].value = true;
            this.setState();
            // eventFlux.dispatch(['payment_init_Event'], {change: 'platform', data: this.state.platform});
        }
    },
    render:function() {
        var Component = this;
        var banks = this.state.banks;
        var platform = this.state.platform;
        return ~pay;
    }
});
module.exports = payComponent;